var path = require("path");
var webpack = require("webpack");
 var OccurrenceOrderPlugin = webpack.optimize.OccurrenceOrderPlugin;
  var uglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
module.exports = {
    entry: {
        vendor: [path.join(__dirname, "client", "vendors.js")]
    },
    output: {
        path: path.join(__dirname, "bundle", "dll"),
        filename: "dll.[name].js",
        library: "[name]"
    },
    plugins: [
        new webpack.DllPlugin({
            path: path.join(__dirname, "dll", "[name]-manifest.json"),
            name: "[name]",
            context: path.resolve(__dirname, "client")
        }),
        new OccurrenceOrderPlugin(),
        new uglifyJsPlugin()
    ],
    resolve: {
        modules: [path.resolve(__dirname, "client"), "node_modules"] 
    }
};

